/*
 * Copyright (c) 2018.
 * http://www.ulabcare.com
 */

package com.mt.roll.upms.params;

import com.mt.roll.core.base.BaseParam;
import com.mt.roll.core.validator.constraints.Password;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

/**
 * 修改密码请求参数对象
 *
 * @author jiff
 * @date 2018/11/14
 * @since 1.0
 */
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Data
@Builder
@ApiModel(value = "修改密码请求参数对象", description = "用于修改用户自己的密码")
public class ModifyPasswordParam extends BaseParam {

    /**
     * 密码
     */
    @ApiModelProperty(value = "原密码", required = true, example = "123456", position = 1)
    @Length(min = 6, max = 20, message = "原密码长度为6-20位")
    private String password;

    /**
     * 密码
     */
    @ApiModelProperty(value = "新密码", required = true, example = "123abc.", position = 2)
    @Length(min = 6, max = 20, message = "新密码长度为6-20位")
    @Password(format = Password.PasswordFormat.NUMBER_LETTER_CHAR, message = "密码必须同时包含数字、字母、特殊字符")
    private String newPassword;


}
